<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title>进度条的显示</title>
<link href="CSS/progress.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
function progressTest(n){	
    var prog=document.getElementById('progress');
    prog.firstChild.nodeValue=n+"%";
    prog.style.width=(n*2)+"px";
    n+=20;
    if(n>100){
        n=100;
    }
    setTimeout('progressTest('+n+')',1000);
}
</script>
</head>

<body>
<p id="test"><span id="progress">10%</span></p>
<script type="text/javascript">
progressTest(10);
</script>
</body>
</html>
